/**
 * 
 */
package com.epoint.mobileoa.datanalysis;

import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;

/**
 * @author Administrator
 *
 */
public class XMLManager
{
	private static XmlPullParser parser;
	private static XmlPullParserFactory factory;
	
	/**
	 * 获取XmlPullParser实例
	 * 
	 * @return XmlPullParser实例
	 */
	public static XmlPullParser getInstance()
	{
		try
		{
			//简单单例模式
			if (null == parser)
			{
				factory = XmlPullParserFactory.newInstance();
				parser = factory.newPullParser();
			}
		} 
		catch (XmlPullParserException e)
		{
			e.printStackTrace();
		}
		
		return parser;
	}
}
